package com.threadlocal.pool.socket;

import java.io.IOException;
import java.net.ServerSocket;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;


public class ThreadPool {

	public static void main(String[] args) {
		Executor executor = Executors.newFixedThreadPool(10);
		while (true) {
			ServerSocket ss = null;
			try {
				ss = new ServerSocket(1111);
				executor.execute(new WorkerThread(ss.accept()));
			} catch (IOException e) {

			}
		}

	}
}
